import request from '@/utils/request'
export default {
    getTeacherListPage(current, limit, teacherQuery) {
        return request({

            url: `/teacher/page/condition/${current}/${limit}`,
            method: 'post',
            //把对象转换成json进行传递到接口里面
            data: teacherQuery
        })
    },
    deleteTeacherById(id) {
        return request({

            url: `teacher/delete/${id}`,
            method: 'delete',
        })
    },
    addTeacher(teacher) {
        return request({
            url: `/teacher/add`,
            method: "post",
            data: teacher
        })
    },
    getTeacherInfo(id) {
        return request({
            url: `/teacher/get/${id}`,
            method: "get",
        });
    },
    updateTeacherInfo(teacher) {
        return request({
            url: `/teacher/update`,
            method: "post",
            data: teacher
        });
    },
  getTeacher(){
    return request({
      url: `/teacher/getAll`,
      method: "get",
    });
  }
}
